//
//  UIColor+FWPowerful.h
//  iOSToolkit
//
//  Created by Evan Xie on 9/17/14.
//  Copyright (c) 2014 Family Wings. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIColor (FWPowerful)

/**
 Convert RGB hexadecimal string to UIColor with specified alpha.
 
 @param rgbHexString Can be like "#FF99FF", "0xFF99FF", "0XFF99FF", "FF99FF". If the length of hexstring
 is less than 6, this method will append 0 to end of the given hex string. eg. "FF99" will be treated 
 as "FF9900", "FF" as "FF0000".
 
 @return If invalid rgbHexString is passed into this method, just return black color.
 */
+ (UIColor *)colorWithRGBHexString:(NSString *)rgbHexString alpha:(CGFloat)alpha;

/** Convert RGB hexadecimal value to UIColor with specified alpha, eg. 0xFF99FF */
+ (UIColor *)colorWithRGBHexValue:(NSUInteger)rgbHexValue alpha:(CGFloat)alpha;

/**
 Convert RGBA hexadecimal string to UIColor.
 
 @param rgbaHexString Can be like "#FF99FFCC", "0xFF99FFCC", "0XFF99FFCC", "FF99FFCC". If the length of 
 hexstring is less than 8, this method will append 0 to end of the given hex string. eg. "FF99" will
 be treated as "FF990000", "FF" as "FF000000".
 
 @return If invalid rgbHexString is passed into this method, just return black color.
 */
+ (UIColor *)colorWithRGBAHexString:(NSString *)rgbaHexString;

/** Convert RGBA hexadecimal value to UIColor, eg. 0xFF99FF88 */
+ (UIColor *)colorWithRGBAHexValue:(NSUInteger)rgbaHexValue;

@end
